package com.yang.spring.events;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 自定义事件监听器
 */
@Component
public class CustomEventListener implements ApplicationListener<CustomEvent> {
    
    @Override
    public void onApplicationEvent(CustomEvent event) {
        System.out.println("接收到自定义事件 - 消息内容: " + event.getMessage());
        // 这里可以添加处理事件的业务逻辑
    }
} 